package com.kanous.car_rental.service.impl;

import com.kanous.car_rental.pojo.ManagerInfo;
import com.kanous.car_rental.service.ManagerInfoService;
import com.kanous.car_rental.mapper.ManagerInfoMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ManagerInfoServiceImpl implements ManagerInfoService {
    @Autowired
    private ManagerInfoMapper managerInfoMapper;

    // 增
    @Override
    public void insert(ManagerInfo managerInfo){
        managerInfoMapper.insert(managerInfo);
    }

    // 指定managerID删除
    @Override
    public void delete(String managerID){
        managerInfoMapper.delete(managerID);
    }

    // 指定managerID更新
    @Override
    public void update(ManagerInfo managerInfo){
        managerInfoMapper.update(managerInfo);
    }

    // 指定managerID或managerName查询
    @Override
    public List<ManagerInfo> list1(String managerID, String managerName){
        return managerInfoMapper.list1(managerID, managerName);
    }

    // 全部查
    @Override
    public List<ManagerInfo> list2(){
        return managerInfoMapper.list2();
    }
}
